

forvalues i=1950(1)2004 {


import delimited "/Users/DanielBFiroozi/Documents/UCI/Neumark RA/Resume Data/Supplemental Data/names/yob`i'.txt", clear

save  "/Users/DanielBFiroozi/Documents/UCI/Neumark RA/Resume Data/Supplemental Data/names/yob`i'.dta", replace

}

use "/Users/DanielBFiroozi/Documents/UCI/Neumark RA/Resume Data/Supplemental Data/names/yob1950.dta", clear

forvalues i=1951(1)2004 {

append using "/Users/DanielBFiroozi/Documents/UCI/Neumark RA/Resume Data/Supplemental Data/names/yob`i'.dta"

}

gen men=v3 if v2=="M"
rename v3 population
rename v1 name

collapse (sum) population men, by(name)

gen percent_men=men/population

sort percent_men

gen female=0 if percent_men>=0.2
replace female=1 if percent_men<0.2

gen male=0 if percent_men<=0.8
replace male=1 if percent_men>0.8

keep if male==1 | female==1

keep name female male

replace name=upper(name)

save  "/Users/DanielBFiroozi/Documents/UCI/Neumark RA/Resume Data/Supplemental Data/ss_names.dta", replace
